<script>
	/*
	  创建一个```Employee```（员工）类
	实现以下要求：
	
	- 构造方法有两个参数，firstname（名），lastname（姓），都是英文，并初始化相应的属性
	- 员工有属性fullname（全名）和email
	  - fullname 是姓 名
	  - email的值是姓.名@company.com
	*/

	class Employee {
		firstname
		lastname
		constructor(firstname, lastname) {
			this.firstname = firstname
			this.lastname = lastname
		}
		get fullname() {
			return this.firstname + this.lastname
		}
		set fullname(v) {
			if (typeof (+v) === "number") {
				return
			} else {
				this.firstname = v[0]
				this.lastname = v[1]
			}
		}
		get email() {
			return `${this.firstname}.${this.lastname}@company.com`
		}
		set email(v) {
			if (typeof (+v) === "number") {
				return
			} else {
				this.firstname = v[0]
				this.lastname = v[1]
			}
		}
	}


	emp1 = new Employee("Zhang", "San")
	emp1.fullname // "Zhang San"
	emp1.fullname = '123' // 赋值无效=
	emp1.fullname // 还是"Zhang San"

	emp2 = new Employee("Li", "Si")
	emp2.email // "li.si@company.com"

</script>